package org.springblade.modules.repair.vo.plan;

import cn.hutool.core.convert.Convert;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

/**
 * @author zcc
 * @version 1.0
 * @date 2021/10/16 9:44
 */
@Data
public class MaintainPlanContentListVo implements Comparable<MaintainPlanContentListVo>{

	@ApiModelProperty("小区名称")
	private String buildingName;

	@ApiModelProperty("小区ID")
	private Long buildingId;

	private String buildingAddress;

	@ApiModelProperty(value = "经度")
	private String longitude;

	@ApiModelProperty(value = "纬度")
	private String latitude;

	@ApiModelProperty("排序权重")
	private BigDecimal weight = Convert.toBigDecimal(0);

	@ApiModelProperty("距离文案")
	private String kmDesc;

	@ApiModelProperty("别名")
	private String aliasStr;

	@ApiModelProperty(value = "数据列表")
	List<PlanContentElevatorVo> list;

	@Override
	public int compareTo(MaintainPlanContentListVo maintainPlanContentListVo) {
		return Convert.toInt(maintainPlanContentListVo.getWeight().subtract(this.weight)) ;
	}

}
